package com.softservecom.training.shop.pojos;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * UsersTypes entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "UsersTypes", schema = "dbo", catalog = "Java")
public class UsersTypes implements java.io.Serializable {

	// Fields

	private Integer userTypeId;
	private String type;
	private Set<Users> userses = new HashSet<Users>(0);

	// Constructors

	/** default constructor */
	public UsersTypes() {
	}

	/** minimal constructor */
	public UsersTypes(Integer userTypeId, String type) {
		this.userTypeId = userTypeId;
		this.type = type;
	}

	/** full constructor */
	public UsersTypes(Integer userTypeId, String type, Set<Users> userses) {
		this.userTypeId = userTypeId;
		this.type = type;
		this.userses = userses;
	}

	// Property accessors
	@Id
	@Column(name = "UserTypeID", unique = true, nullable = false)
	public Integer getUserTypeId() {
		return this.userTypeId;
	}

	public void setUserTypeId(Integer userTypeId) {
		this.userTypeId = userTypeId;
	}

	@Column(name = "Type", nullable = false, length = 50)
	public String getType() {
		return this.type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "usersTypes")
	public Set<Users> getUserses() {
		return this.userses;
	}

	public void setUserses(Set<Users> userses) {
		this.userses = userses;
	}

}